//
//  AlertView.m
//  Bracelet
//
//  Created by Jayce on 15/3/10.
//  Copyright (c) 2015年 jing zhao. All rights reserved.
//

#import "AlertView.h"

static AlertView *_instance = nil;

@implementation AlertView

+(AlertView *)shareInstance{
  
  static dispatch_once_t onceToken;
  dispatch_once(&onceToken, ^{
    _instance = [[AlertView alloc] init];
  });
  return _instance;
}

-(instancetype)init{
  self = [super init];
  if (self) {
    
  }
  return self;
}

+(id)allocWithZone:(struct _NSZone *)zone{
  static dispatch_once_t onceToken;
  dispatch_once(&onceToken, ^{
    _instance = [super allocWithZone:zone];
  });
  return _instance;
}

-(id)copyWithZone:(NSZone *)zone{
  return _instance;
}


- (IBAction)sureBtnClicked:(id)sender {
    if (_alertDelegate && [_alertDelegate respondsToSelector:@selector(alertButtonPressed:)]) {
        [self.alertDelegate performSelector:@selector(alertButtonPressed:) withObject:self];
    }
  [self removeFromSuperview];
}


@end
